name := "MyPracticeOfScala"

version := "1.0"

scalaVersion := "2.11.8"
lazy val akkaVersion = "2.4.3"
val phantomVersion = "1.25.4"

resolvers ++= Seq(
    "Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/",
    "Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/",
    "Sonatype repo" at "https://oss.sonatype.org/content/groups/scala-tools/",
    "Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases",
    "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
    "Sonatype staging" at "http://oss.sonatype.org/content/repositories/staging",
    "Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
    "Twitter Repository" at "http://maven.twttr.com",
    "Websudos releases" at "https://dl.bintray.com/websudos/oss-releases/"
)

libraryDependencies ++= Seq(
    "commons-io" % "commons-io" % "2.4",

    //tim
    //"joda-time" % "joda-time" % "2.9.1",

    //test
    "org.scalatest" %% "scalatest" % "2.2.4" % "test",
    "org.specs2" %% "specs2-core" % "3.6.5" % "test",
    "org.scalacheck" %% "scalacheck" % "1.13.2" % "test",

    //Network json
    "org.json4s" %% "json4s-ext" % "3.3.0",
    "com.github.tototoshi" %% "play-json4s-native" % "0.4.2",

    //database
    "mysql" % "mysql-connector-java" % "5.1.36",
    "io.strongtyped" %% "active-slick" % "0.3.4",
    "com.typesafe.slick" %% "slick" % "3.1.0",
    "com.typesafe.slick" %% "slick-codegen" % "3.1.0",
    "com.github.tototoshi" %% "slick-joda-mapper" % "2.2.0",
    "org.joda" % "joda-convert" % "1.7",
    "joda-time" % "joda-time" % "2.9.3",
    "com.h2database" % "h2" % "1.3.175",

    //database - scalikejdbc
    "org.scalikejdbc" %% "scalikejdbc" % "2.4.+",

    //log
    "org.slf4j" % "slf4j-api" % "1.7.21",
    //"org.slf4j" % "slf4j-simple" % "1.7.21",
    "ch.qos.logback" % "logback-site" % "1.1.7",
    //"org.log4s" %% "log4s" % "1.2.1",
    //"com.typesafe.scala-logging" %% "scala-logging" % "3.1.0",

    //akka
    "com.typesafe.akka" %% "akka-actor" % akkaVersion,
    "com.typesafe.akka" %% "akka-testkit" % akkaVersion,

    //phantom - cassandra
    "com.websudos" %% "phantom-dsl" % phantomVersion,
    //"com.websudos" %% "phantom-testkit" % phantomVersion,

    "com.websudos" %% "phantom-example" % phantomVersion,

    //elastic search
    //"com.sksamuel.elastic4s" % "elastic4s-core_2.11" % "1.5.17",
    "org.elasticsearch" % "elasticsearch" % "1.5.1",

    //germlin
    "com.michaelpollmeier" % "gremlin-scala_2.11" % "3.0.2-incubating.2",
    "org.apache.tinkerpop" % "gremlin-driver" % "3.0.2-incubating",

    //titan
    "com.thinkaurelius.titan" % "titan-es" % "1.0.0",
    "com.thinkaurelius.titan" % "titan-cassandra" % "1.0.0",
    "com.thinkaurelius.titan" % "titan-berkeleyje" % "1.0.0",
    "com.thinkaurelius.titan" % "titan-core" % "1.0.0",
    //"com.thinkaurelius.titan" % "titan-lucene" % "1.0.0",
    //"com.thinkaurelius.titan" % "titan-all" % "1.0.0"

    //crawler
    "us.codecraft" % "webmagic-core" % "0.5.3",
    "us.codecraft" % "webmagic-extension" % "0.5.3",
    //"us.codecraft" % "webmagic-parent" % "0.5.3"

    "net.ruippeixotog" %% "scala-scraper" % "1.0.0",

    //spark - cassandra
    "com.datastax.spark" %% "spark-cassandra-connector" % "1.6.0",
    "com.datastax.spark" % "spark-cassandra-connector-java_2.11" % "1.6.0-M1",

    "org.apache.spark" % "spark-core_2.11" % "1.6.2",
    "org.apache.spark" % "spark-sql_2.11" % "1.6.2",
    "org.apache.spark" % "spark-graphx_2.11" % "1.6.2",

    //jena (rdf reader)
    "org.apache.jena" % "apache-jena" % "3.1.0",

    //blazegraph-gremlin
    "com.blazegraph" % "blazegraph-gremlin" % "1.0.0"
    //"org.apache.lucene" % "lucene-core" % "3.0.0",
    //"org.apache.lucene" % "lucene-analyzers-common" % "3.0.0"

)
excludeDependencies ++= Seq(
    "org.slf4j" % "slf4j-log4j12"
)

assemblyMergeStrategy in assembly := {
    case PathList("javax", "servlet", xs@_*) => MergeStrategy.first
    case PathList(ps@_*) if ps.last endsWith ".html" => MergeStrategy.first
    case "application.conf" => MergeStrategy.concat
    case "unwanted.txt" => MergeStrategy.discard
    case x =>
        val oldStrategy = (assemblyMergeStrategy in assembly).value
        oldStrategy(x)
}